package nl.ru.rd.facedetection.nnbfd.tests;

import nl.ru.rd.facedetection.nnbfd.FacedetectionNetwork;
import nl.ru.rd.facedetection.nnbfd.neuralnetwork.NeuralNetwork;

/**
 * Test the FacedetectionNetwork by letting it learn 100 random patterns.
 * @author Wouter Geraedts (s0814857)
 */
public class FacedetectionTest extends Test
{
	public void test()
	{
		this.set = new double[100][][];
		
		for(int i = 0; i < 100; i++)
		{
			this.set[i] = new double[2][];
			this.set[i][0] = new double[20*20];
			this.set[i][1] = new double[] {Math.round(Math.random())};
			
			for(int j = 0; j < 20*20; j++)
				this.set[i][0][j] = Math.random();
		}
		
		NeuralNetwork network;
		
		network = new FacedetectionNetwork();
		this.learn(network, 0.2);
		System.out.println("");
	}
	
	public static void main(String[] args)
	{
		FacedetectionTest test = new FacedetectionTest();
		test.test();
	}
}
